/*
 * <p>Copyright ®Alyce_WX版权所有。</p>
 * 类名:TagPO
 * 创建人:alyce_wx
 * 创建时间:2017-03-30
 */
package com.wx.demo.wcd.domain.po;


import com.yjhl.framework.domain.po.PO;
import com.wx.demo.wcd.domain.pk.TagPK;

/**
 * persistent class for Tag 
 * @author alyce_wx
 * @since 1.8
 * @version 1.0.0  
 */
 
public class TagPO extends PO {
    private static final long serialVersionUID = 1L;
    
    /**
     * 标签表标识
     */
    private String tagId;
    
    /**
     * 标签编码
     */
    private String tagCode;
    
    /**
     * 作者表标识
     */
    private String authorId;
    
    /**
     * 作品表标识
     */
    private String worksId;

    public String getTagId() {
        return tagId;
    }

    public void setTagId(String tagId) {
        this.tagId = tagId;
    }

    public String getTagCode() {
        return tagCode;
    }

    public void setTagCode(String tagCode) {
        this.tagCode = tagCode;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getWorksId() {
        return worksId;
    }

    public void setWorksId(String worksId) {
        this.worksId = worksId;
    }
    
    
	/**
	 * @see com.yjhl.framework.domain.po.PO#isNull()
	 */
	@Override
    public boolean isNull(){
		return (		
    		tagId == null     	
    		&&
    		tagCode == null     	
    		&&
    		authorId == null     	
    		&&
    		worksId == null     	
				);
	}
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#isEmpty()
	 */
	@Override
    public boolean isEmpty(){
		return (		
    	tagId == null 
    		&&
    	tagCode == null 
    		&&
    	authorId == null 
    		&&
    	worksId == null 
				);
	}
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#isNonPkNull()
	 */
	@Override
    public boolean isNonPkNull(){
		return (		
    		tagCode == null     	
    		&&
    		authorId == null     	
    		&&
    		worksId == null     	
				);
	}

	/**
	 * @see com.yjhl.framework.domain.po.PO#isNonPkEmpty()
	 */
	@Override
    public boolean isNonPkEmpty(){
		return (		
    	tagCode == null 
    		&&
    	authorId == null 
    		&&
    	worksId == null 
				);
	}
	
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#buildPK()
	 */
	@Override
    public TagPK buildPK(){
    	TagPK entityPK = new TagPK();
    	
		entityPK.setTagId( tagId );
    	
    	return entityPK;
	}
	
	
	@Override
	public String toString(){
		
		String toString = "{";
		  	 if(this.tagId != null){
		   	 	toString += (this.tagId+",");
		   	 }
		  	 if(this.tagCode != null){
		   	 	toString += (this.tagCode+",");
		   	 }
		  	 if(this.authorId != null){
		   	 	toString += (this.authorId+",");
		   	 }
		  	 if(this.worksId != null){
		   	 	toString += (this.worksId+",");
		   	 }
		  if(toString.lastIndexOf(",") == ( toString.length()-1)){
		  	toString = toString.substring(0, toString.length()-1);
		  }
		 toString += "}";
		return toString;
		
	}
	
	public String inputDescription(){
		
		String inputDescription = "{";
		   if(this.tagId != null){
		   		inputDescription += (this.tagId+" : 标签表标识,");
		   }
		   if(this.tagCode != null){
		   		inputDescription += (this.tagCode+" : 标签编码,");
		   }
		   if(this.authorId != null){
		   		inputDescription += (this.authorId+" : 作者表标识,");
		   }
		   if(this.worksId != null){
		   		inputDescription += (this.worksId+" : 作品表标识,");
		   }
		  if(inputDescription.lastIndexOf(",") == ( inputDescription.length()-1)){
		  	inputDescription = inputDescription.substring(0, inputDescription.length()-1);
		  }
		  inputDescription += "}";
		
		return inputDescription;
	}
}
